package unmsm.fisi.tesis.si;

import java.util.ArrayList;
import java.util.List;

import unmsm.fisi.tesis.dao.CromosomaDAO;
import unmsm.fisi.tesis.entidad.Configuracion;
import unmsm.fisi.tesis.entidad.Cromosoma;
import unmsm.fisi.tesis.entidad.Organizacion;
import unmsm.fisi.tesis.entidad.Paciente;
import unmsm.fisi.tesis.entidad.Poblacion;
import unmsm.fisi.tesis.servicio.LeerFichero;

public class Carga {

	private List<Organizacion> listaOrganizaciones;
	private StringBuilder seguimiento;

	public StringBuilder getSeguimiento() {
		return seguimiento;
	}

	public void setSeguimiento(StringBuilder seguimiento) {
		this.seguimiento = seguimiento;
	}

	public List<Organizacion> getListaOrganizaciones() {
		if(listaOrganizaciones==null){
			listaOrganizaciones = new ArrayList<Organizacion>();
		}
		
		return listaOrganizaciones;
	}

	public void setListaOrganizaciones(List<Organizacion> listaOrganizaciones) {
		this.listaOrganizaciones = listaOrganizaciones;
	}
	
	
	public void GenerarFuenteInformacionPorOrganizacion_Antes(
			int[] reglasxOrganizacion) {

		Organizacion organi;

		// matriz de posibilidades para la OMS
		int[][] OMS = { { 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1 },
						{ 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0 },
						{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
						{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
						{ 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1 },
						{ 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1 },
						{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
						{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
						{ 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0 },
						{ 1, 1, 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1, 1, 1, 1, 1 },
						{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
						{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
						{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
						{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
						{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
						{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
						{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
						{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
						{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
						{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
						{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
						{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
						{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
						{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
						{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
						{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
						{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
						{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
						{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
						{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
						{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
						{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
						{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } };

		organi = new Organizacion("OMS", OMS, reglasxOrganizacion[0],
				OMS[0].length, "1");// 53, 21);
		this.getListaOrganizaciones().add(organi);

		int[][] GESMM = { { 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0 },
				{ 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0 },
				{ 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1 },
				{ 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0 },
				{ 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0 },
				{ 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1 },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, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1 },
				{ 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0 },
				{ 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1 },
				{ 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0 },
				{ 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0 },
				{ 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1 },
				{ 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1 },
				{ 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1 },
				{ 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1 } };

		organi = new Organizacion("GESMM", GESMM, reglasxOrganizacion[1],
				GESMM[0].length, "1");// 53, 21);
		this.getListaOrganizaciones().add(organi);

		int[][] AAC = { { 0 }, { 0 }, { 1 }, { 1 }, { 0 }, { 0 }, { 0 }, { 0 },
				{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
				{ 0 }, { 0 }, { 0 }, { 0 }, { 1 }, { 1 }, { 0 }, { 0 }, { 0 },
				{ 0 }, { 1 }, { 0 }, { 0 }, { 0 }, { 0 }, { 1 }, { 0 }, { 0 },
				{ 1 }, { 1 }, { 1 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
				{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 } };

		organi = new Organizacion("AAC", AAC, reglasxOrganizacion[2],
				AAC[0].length, "1");// 53, 21);
		this.getListaOrganizaciones().add(organi);

		int[][] PNE = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0 },
				{ 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1 },
				{ 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0,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},
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } };

		organi = new Organizacion("PNE", PNE, reglasxOrganizacion[3],
				PNE[0].length, "1");// 53, 21);
		this.getListaOrganizaciones().add(organi);

		int[][] FDI = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1 } };

		organi = new Organizacion("FDI", FDI, reglasxOrganizacion[4],
				FDI[0].length, "1");// 53, 21);
		this.getListaOrganizaciones().add(organi);

		int[][] CNE = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 1, 0, 0, 1, 1, 0, 1, 0, 1, 1 },
				{ 0, 1, 0, 1, 1, 0, 0, 1, 1, 1 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 1, 1, 1, 0, 0, 1, 1, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 1, 1, 1, 1, 0, 0, 1, 0, 1,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 1, 0, 0, 0, 1, 1, 0, 0, 0 },
				{ 0, 1, 0, 0, 1, 1, 1, 0, 0, 1 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 1, 0, 1, 0, 0, 1 },
				{ 1, 1, 0, 1, 1, 0, 0, 1, 1, 1 },
				{ 1, 1, 0, 0, 0, 1, 1, 0, 0, 1 },
				{ 1, 1, 1, 1, 1, 1, 1, 0, 1, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } };

		organi = new Organizacion("CNE", CNE, reglasxOrganizacion[5],
				CNE[0].length, "1");// 53, 21);
		this.getListaOrganizaciones().add(organi);

		int[][] GEIR = { { 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1 },
				{ 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1 },
				{ 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } };

		organi = new Organizacion("GEIR", GEIR, reglasxOrganizacion[6],
				GEIR[0].length, "1");// 53, 21);
		this.getListaOrganizaciones().add(organi);

	}

	

	public void GenerarFuenteInformacionPorOrganizacion(
			int[] reglasxOrganizacion) {

		Organizacion organi;

		// matriz de posibilidades para la OMS
		int[][] OMS = {{1,0,0,0,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1},
				{1,1,0,0,1,1,0,0,0,1,1,0,0,0,0,1,1,0,1,1,0,0,0,1,0,1,0,1,1,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,1,1,1,0,0,0,0,1,0,1,1,1,0,0,0,0,1,1,1,1,1,0,0,1,0,1,1,0},
				{0,1,1,1,0,0,0,0,1,1,1,0,1,1,0,0,1,1,0,1,0,0,0,0,1,1,1,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,1,0,0,1,1,0,1,1,1,0,1,0,1,1,0,0,1,0,0,1,1,0,1,0,1,0},
				{1,0,1,1,0,1,1,1,1,0,1,0,0,1,1,1,1,1,0,0,1,1,0,0,1,1,1,1,0,1},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} };

		organi = new Organizacion("OMS", OMS, reglasxOrganizacion[0],
				OMS[0].length, "1");// 53, 21);
		this.getListaOrganizaciones().add(organi);

		int[][] GESMM = { {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{1,0,1,0,1,0,0,0,1,1,0,0,0,0,1},
				{0,1,0,1,0,0,0,1,0,1,1,1,0,1,1},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{1,0,0,1,1,1,0,0,1,1,1,1,1,1,1},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{1,0,1,0,0,0,0,0,1,0,0,0,0,0,0},
				{0,1,0,1,0,1,1,0,1,1,1,0,0,0,1},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,1,1,0,1,0,0,0,1,1,0,1,0,1,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
				{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
				{1,1,1,1,1,0,1,1,0,1,0,1,1,1,1},
				{0,1,1,0,0,0,0,0,1,1,1,1,1,0,1},
				{1,1,0,1,0,0,1,0,1,1,0,0,0,1,0},
				{1,1,0,0,0,1,0,0,1,0,0,1,1,1,0},
				{1,1,1,0,1,1,1,0,1,1,0,0,1,1,1},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{1,0,0,1,1,0,1,0,1,1,0,1,0,0,1},
				{0,1,1,1,0,0,0,1,1,0,0,1,1,1,1},
				{0,1,0,1,0,1,1,0,1,1,1,1,0,1,1},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,1,1,0,0,0,0,1,0,0},
				{1,0,0,1,1,1,0,1,0,0,0,0,1,0,0},
				{1,0,0,1,0,0,1,0,0,1,1,0,1,0,0},
				{0,0,0,1,0,1,0,1,0,0,1,0,1,1,1},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} };

		organi = new Organizacion("GESMM", GESMM, reglasxOrganizacion[1],
				GESMM[0].length, "1");// 53, 21);
		this.getListaOrganizaciones().add(organi);

		int[][] AAC = { {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,1,0,0,0,1,0,1,1,1,0,0,1},
				{1,1,0,0,1,1,1,0,1,0,0,0,1,1,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,1,0,1,0,0,1,0,0,1,0,1,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,1,0,0,0,0,0,1,1,1,1,1,0,1},
				{0,1,1,1,0,0,0,1,0,1,1,1,0,1,1},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{1,1,1,1,0,1,0,0,0,1,1,1,0,0,0},
				{1,1,0,0,1,0,0,1,0,1,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{1,1,0,1,1,1,1,1,1,1,1,1,0,1,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,1,1,0,1,0,0,0,0,0,0,1,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,1,0,0,1,1,1,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}};

		organi = new Organizacion("AAC", AAC, reglasxOrganizacion[2],
				AAC[0].length, "1");// 53, 21);
		this.getListaOrganizaciones().add(organi);

		int[][] PNE = {{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{1,0,1,1,1,1,1,1,1,0,1,0,0,0,1},
				{0,1,1,0,1,1,1,0,1,0,1,1,0,1,1},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{1,1,0,1,0,1,1,1,1,1,1,0,1,1,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,1,1,0,1,1,0,1,0,0,0,0,1},
				{0,1,1,0,1,1,1,0,1,0,1,1,1,1,1},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{1,1,0,1,1,1,1,0,0,1,0,1,1,0,1},
				{0,1,1,0,0,0,1,1,0,1,0,1,0,1,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{1,0,0,0,0,1,0,0,1,0,1,0,0,1,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}};

		organi = new Organizacion("PNE", PNE, reglasxOrganizacion[3],
				PNE[0].length, "1");// 53, 21);
		this.getListaOrganizaciones().add(organi);

		int[][] FDI = {{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,1,1,0,1,1,0,1,1,0,1,1,1},
				{0,0,0,0,1,1,1,1,0,1,1,0,0,0,1},
				{1,1,0,0,0,1,1,1,1,0,1,0,0,1,0},
				{1,0,0,1,0,1,0,1,0,1,0,0,1,1,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{1,0,1,1,1,1,0,0,1,0,0,1,0,1,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{1,0,1,1,1,0,0,1,0,0,1,1,1,0,0},
				{1,1,1,0,0,1,0,0,1,1,0,0,1,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
				{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,1,0,1,0,1,0,0,1,0,1,0,1,0,1},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,1,0,0,0,0,1,1,1,1,0,1,0,1,1},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}};

		organi = new Organizacion("FDI", FDI, reglasxOrganizacion[4],
				FDI[0].length, "1");// 53, 21);
		this.getListaOrganizaciones().add(organi);

		int[][] CNE = { {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,1,1,0,0,0,1,0,1,1,1,0,0,1,1,1,0,0,1},
				{1,0,1,1,0,0,1,1,1,0,0,0,0,1,1,1,1,1,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,1,1,1,0,0,0,1,1,1,0,1,1,0,0,1,0,1,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,1,0,1,0,0,1,1,0,0,0,0,0,1,0,0,0,1,0,0},
				{1,1,1,0,1,0,1,1,1,1,1,0,0,0,1,1,0,1,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,1,0,1,0,0,0,0,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1,0,0,0,0,0,0,1,0,1,1,0,0,1,0},
				{1,1,0,0,1,1,0,1,1,0,0,1,1,1,1,1,0,0,1,0},
				{1,1,0,0,1,0,1,1,1,1,1,0,0,1,1,1,0,0,1,0},
				{1,1,1,1,1,1,0,1,0,1,0,1,0,0,0,0,0,1,1,0},
				{0,1,1,1,0,0,0,1,0,0,0,1,1,1,1,1,0,1,1,1},
				{1,0,1,0,0,1,0,0,1,1,0,1,1,1,0,1,1,0,0,0},
				{1,1,0,0,0,0,0,0,1,1,1,0,0,1,0,0,1,0,1,1},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,1,0,0,1,1,0,1,1,1,0,0,0,1,0,1,1,0,0}};

		organi = new Organizacion("CNE", CNE, reglasxOrganizacion[5],
				CNE[0].length, "1");// 53, 21);
		this.getListaOrganizaciones().add(organi);

		int[][] GEIR = { {1,1,1,0,0,1,0,1,1,1,0,0,1,0,1},
				{1,0,1,1,1,0,1,0,1,1,1,0,0,0,1},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{1,1,1,0,1,1,1,1,1,1,0,1,1,0,1},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{1,1,1,1,0,1,1,1,0,1,0,0,1,1,1},
				{0,0,0,1,0,1,0,0,0,1,0,0,1,1,0},
				{0,0,1,1,1,1,0,0,0,1,1,0,0,0,1},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{1,1,0,0,0,0,1,0,0,1,1,1,1,1,1},
				{0,0,0,0,1,0,1,0,1,1,0,0,0,1,1},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,1,1,0,1,1,1,1,1,1,0,1,0,1,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{1,0,1,0,0,0,1,1,1,1,0,0,0,1,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}};

		organi = new Organizacion("GEIR", GEIR, reglasxOrganizacion[6],
				GEIR[0].length, "1");// 53, 21);
		this.getListaOrganizaciones().add(organi);

	}

	public void GenerarDatosOrganizacionDesdeArchio(int fila, int colum) {

		Organizacion organi;
		String nombreArchivo;

		organi = new Organizacion(fila, colum);
		nombreArchivo = "C:\\archivo.txt";
		LeerFichero.cargarDatosArchivo(nombreArchivo,
				organi.getFuenteInformacion(), fila, colum);

		this.getListaOrganizaciones().add(organi);

	}

	public Poblacion generarPoblacionInicial(Configuracion configuracion, StringBuilder seguimiento) {

		Poblacion poblacion = new Poblacion();
		
		int indice_Organiz = 0, numeroOrganizacionesParticipantes = 7;
		int hallazgos = configuracion.getNumHallazgos();
		int tamanioPoblacion = configuracion.getNumeroPoblacion();
		int numReglaTotalElegidas = 0;
		int reglasUsadas = 0;
		int[][] nuevoConocimiento;

		this.setSeguimiento(seguimiento);

		poblacion.setTamanioPoblacion(tamanioPoblacion);

		GenerarFuenteInformacionPorOrganizacion(configuracion.getReglasToUsarOrganizacion());
		// GenerarDatosOrganizacionDesdeArchivo();

		for (int i = 0; i < configuracion.getReglasToUsarOrganizacion().length; i++) {
			numReglaTotalElegidas = numReglaTotalElegidas 	+ configuracion.getReglasToUsarOrganizacion()[i];
		}

		// CREAMOS LOS PRIMEROS CONOCIMIENTOS
		for (int index_conocimiento = 0; index_conocimiento < poblacion
				.getTamanioPoblacion(); index_conocimiento++) {

			nuevoConocimiento = new int[hallazgos][numReglaTotalElegidas];
			reglasUsadas = 0;
			indice_Organiz = 0;

			// CREAMOS LAS REGLAS PARA CADA CONOCIMIENTO
			while (indice_Organiz < numeroOrganizacionesParticipantes) {

				generarConocimiento(getListaOrganizaciones()
						.get(indice_Organiz), nuevoConocimiento, reglasUsadas,
						hallazgos, index_conocimiento);

				reglasUsadas = reglasUsadas
						+ configuracion.getReglasToUsarOrganizacion()[indice_Organiz];
				indice_Organiz++;
			}

			Cromosoma cromosoma = new Cromosoma();
			cromosoma.setConocimiento(nuevoConocimiento);
			cromosoma.setGeneracionNacimiento(1);
			cromosoma.setParentesco("");
			cromosoma.setNumeroCromosoma(Constantes.NUMERO_CROMOSOMAS);
			poblacion.getListaCromosomas().add(cromosoma);
			Constantes.NUMERO_CROMOSOMAS ++;
			
			this.getSeguimiento().append("<br>");
			System.out.println("Conocimiento #" + (index_conocimiento + 1)
					+ "\n");
			this.getSeguimiento().append(
					"Conocimiento #" + (index_conocimiento + 1));
			this.getSeguimiento().append("<br>");

			for (int j1 = 0; j1 < nuevoConocimiento.length; j1++) {

				for (int j2 = 0; j2 < nuevoConocimiento[j1].length; j2++) {
					System.out.print(nuevoConocimiento[j1][j2] + ",");
					this.getSeguimiento().append(
							nuevoConocimiento[j1][j2] + ",");
				}

				System.out.print("\n");
				this.getSeguimiento().append("<br>");
			}

			System.out.print("\n");
			System.out.print("\n");

			this.getSeguimiento().append("<br>");
			this.getSeguimiento().append("<br>");

		}

		return poblacion;

	}

	
	public void generarConocimiento(Organizacion informacionOrganizacion, int[][] nuevoConocimiento, int reglasUsadas, int totalHallazgos,
			int index_conocimiento) {

		int totalReglasDeOrganizacionParticipante = informacionOrganizacion.getNumeroReglas();
		int reglaElegida, noElegida = 0, fueElegida = 1;
		int listaReglasElegidas[] = new int[totalReglasDeOrganizacionParticipante];
		double reglaAleatoria = 0.0;

		for (int i = 0; i < totalReglasDeOrganizacionParticipante; i++) {
			listaReglasElegidas[i] = noElegida;
		}

		for (int j = 0; j < informacionOrganizacion.getNumReglasAConsiderar(); j++) {
			
			if(j == totalReglasDeOrganizacionParticipante)
				break;
			
			do {
				reglaAleatoria = (double) (Math.random() * totalReglasDeOrganizacionParticipante);
 				if ((int) reglaAleatoria == totalReglasDeOrganizacionParticipante)
					reglaAleatoria--;
			} while (listaReglasElegidas[(int) reglaAleatoria] == fueElegida);
			reglaElegida = (int) reglaAleatoria;
			listaReglasElegidas[reglaElegida] = fueElegida;

			System.out.println("Regla # " + (j + 1) +" de "+ informacionOrganizacion.getNombre()+" para el conocimiento "
					+ (index_conocimiento + 1) + " " + (reglaElegida + 1));
			this.getSeguimiento().append(
					"Regla # " + (j + 1) + " para el conocimiento "
							+ (index_conocimiento + 1) + " "
							+ (reglaElegida + 1) + "<br>");

			for (int x = 0; x < totalHallazgos; x++) {// devuelve el numero de
														// filas
				nuevoConocimiento[x][reglasUsadas + j] = informacionOrganizacion
						.getFuenteInformacion()[x][reglaElegida];
			}
		}

	}

	public static int[][] cargarHistoriasDePacientes() {
		
		/*int experiPacientes[][] = {
				{ 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0 },
				{ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1 },
				{ 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0 },
				{ 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 },
				{ 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0 },
				{ 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1 },
				{ 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0 },
				{ 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0 },
				{ 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1 },
				{ 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1 },
				{ 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0 },
				{ 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0 },
				{ 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0,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0,0,0,0},
			{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
			{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
			{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
			{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
			{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
			{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
			{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
			{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
			{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}};

		return experiPacientes;

	}

	public static int[] cargarDiagnosticoDePacientes() {

		
		/*int diagnostico[] = 
			{ 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1 };
		*/
		/*int diagnostico[] = 
				{1,	0, 1, 0, 1,	0, 1, 0, 1,	0, 0, 0, 1,	0, 1, 1, 0,	0, 1, 0};*/
		int diagnostico[] = 
			{0,0,1,1,1,1,0,1,0,1,0,0,1,1,1,1,1,0,0};
		
		return diagnostico;

	}

}
